package com.budwk.app.wxprogram.models;

import cn.hutool.core.util.IdUtil;
import com.budwk.starter.common.openapi.annotation.ApiModel;
import com.budwk.starter.common.openapi.annotation.ApiModelProperty;
import com.budwk.starter.database.model.BaseModel;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.nutz.dao.entity.annotation.*;
import org.nutz.dao.interceptor.annotation.PrevInsert;

import java.io.Serializable;
import java.util.Date;

/**
 * @title: Wx_event_schedule
 * @Author Tan
 * @Date: 2023/4/13 14:17
 * @Version 1.0
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Table("wx_event_schedule")
@Comment("事件进度表")
@ApiModel(description = "事件进度表")
public class Wx_event_schedule extends BaseModel implements Serializable {
    private static final long serialVersionUID = 1L;

    @Name
    @Column()
    @Comment("id")
    @ColDefine(type = ColType.VARCHAR, width = 255)
    @ApiModelProperty(description = "id")
    @Prev(els=@EL("$me.nextId()"))
    private String id;

    @Comment("事件id")
    @Column
    @ApiModelProperty(description = "事件id")
    @ColDefine(type = ColType.VARCHAR, width = 200)
    private String event_id;

    @Comment("事件状态")
    @Column
    @ApiModelProperty(description = "事件状态")
    @ColDefine(type = ColType.VARCHAR, width = 200)
    private String event_type;

    @Comment("事件时间")
    @Column
    @ApiModelProperty(description = "事件时间")
    @ColDefine(type = ColType.VARCHAR, width = 6)
    private String event_time;

    @Comment("事件内容")
    @Column
    @ApiModelProperty(description = "事件内容")
    @ColDefine(type = ColType.VARCHAR, width = 200)
    private String event_content;

    @Comment("事件备注")
    @Column
    @ApiModelProperty(description = "事件备注")
    @ColDefine(type = ColType.VARCHAR, width = 200)
    private String event_remark;

    @Comment("事件状态")
    @Column
    @ApiModelProperty(description = "事件状态")
    @ColDefine(type = ColType.VARCHAR, width = 200)
    private String event_status;


    public String nextId() {
        return IdUtil.getSnowflake(3, 3).nextIdStr();
    }

}
